package com.y.fund.web.aavo.mem;

import java.util.LinkedHashSet;

import com.y.fund.aacore.able.TreeIface;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class PermVo implements TreeIface<PermVo> {

    private String id;
    private String name;
    private String code;
    private String method;
    private String url;
    /**
     * 权限对应的视图组件路径
     */
    private String viewPath;
    private String iconName;
    private String fid;
    private Integer enabled;
    private Integer type;
    private Integer level;
    private Integer showOrder;

    private LinkedHashSet<PermVo> sub = new LinkedHashSet<PermVo>();

    public PermVo() {
        super();
    }

    public PermVo(String id, String name) {
        super();
        this.id = id;
        this.name = name;
    }

    public PermVo(String id, String name, String method, String url, String viewPath, String iconName, String fid,
                  Integer type) {
        super();
        this.id = id;
        this.name = name;
        this.method = method;
        this.url = url;
        this.viewPath = viewPath;
        this.iconName = iconName;
        this.fid = fid;
        this.type = type;
    }


    public PermVo(String id,String code, String name, String method, String url, String viewPath, String iconName, String fid,
                  Integer type) {
        super();
        this.id = id;
        this.code = code;
        this.name = name;
        this.method = method;
        this.url = url;
        this.viewPath = viewPath;
        this.iconName = iconName;
        this.fid = fid;
        this.type = type;
    }


    @Override
    public Integer getLevel() {
        return level;
    }

    @Override
    public void setLevel(Integer level) {
        this.level = level;
    }

    @Override
    public LinkedHashSet getSub() {
        return sub;
    }

    @Override
    public void setSub(LinkedHashSet sub) {
        this.sub = sub;
    }

}
